<?
    if (isset($_GET['cat']))
    {
        if (isset($_GET['file']))
        {
            $arq = base64_decode($_GET['file']);
            $xml = DOMDocument::load($arq);
            echo $arq." carregado com sucesso!";

            echo "<form name=\"novoitem\" action=\"create.php\" method=\"post\">\n";
            echo "<table border=\"0\">";
            echo "<tr><td>Comando:</td><td><input type=\"text\" name=\"nome\"></td></tr>\n";
            //echo "<tr><td>Try yourself:</td><td><input type=\"text\" name=\"try\"></td></tr>\n";
            //echo "<tr><td>Teacher ask:</td><td><input type=\"text\" name=\"ask\"></td></tr>\n";
            echo "<tr><td valign=\"top\">Comandos:</td><td><textarea name=\"comandos\"></textarea></td></tr>\n";
            echo "<tr><td valign=\"top\">Arquivo:</td><td><input type=\"file\"></td></tr>\n";
            //echo "<tr><td>File help:</td><td><input type=\"file\" name=\"arquivo\"></td></tr>\n";
            echo "<tr><td>Descri&ccedil;&atilde;o:</td><td><input type=\"text\" name=\"desc\"></td></tr>\n";
            echo "</table>";
            echo "<input type=\"hidden\" name=\"file\" value=\"".$_GET['file']."\">\n";
            echo "<input type=\"hidden\" name=\"cat\" value=\"".$_GET['cat']."\">\n";
            echo "<input type=\"submit\" value=\"Enviar\">";
        }
    }
?> 

